from ollama import Client
from ollama import AsyncClient
import asyncio

client = Client(
    host='http://58.135.84.169:11434'
)

async def chat():
    message = {'role': 'user', 'content': '你是谁?'}
    async for part in await AsyncClient(host='http://58.135.84.169:11434').chat(model='qwen3:32b',
                                                                                messages=[message],
                                                                                stream=True):
        print(part['message']['content'], end='', flush=True)



asyncio.run(chat())